Field of the Invention
The invention relates to a computer-implemented method for generating control unit program code, wherein the control unit program code, or an intermediate representation in the generation of the control unit program code, is generated from at least one first data object with at least one first software tool, wherein the first software tool outputs at least one message about the generation process during the generation of the control unit program code or the intermediate representation, and wherein a computer-implemented message management environment acquires the message output by the software tool. In addition, the invention also relates to such a message management environment for managing messages that arise during the generation of control unit program code, wherein the control unit program code or an intermediate representation in the generation of the control unit program code is generated from at least one first data object with at least one first software tool, wherein the first software tool outputs at least one message about the generation process during the generation of the control unit program code or the intermediate representation.
Description of the Background Art
The generation of control unit program code in industrial practice has in the meantime become an extremely complex process which oftentimes involves the use of a plurality of software tools. Control units are generally understood today to be robust microcomputers designed for industrial use that usually have integrated I/O interfaces. The control units, which oftentimes are equipped with a real-time operating system, execute programs that in the broadest sense connect through the I/O interface to a technical process that is to be controlled and act on this process in the desired manner. Control units of the type described are used intensively in the automotive industry, for example. The development of control units, and hence also the development of control unit program code, has in the meantime become an important element in the development of production cars.
A simple example of a software tool with which a control unit program is generated from a data object is a compiler, which translates the program code present in a high-level language into control unit program code that can be executed on the target control unit, which is to say in the form of, e.g., byte code or in the form of a machine-executable machine language. The data object in this case is the source code in a high-level language.
In practice, to a great extent control unit program code is no longer generated by error-prone manual programming in a high-level language, but instead the formulation of the functionality of the control unit program code takes place at a more abstract level, for example with the aid of a graphical modeling environment that permits the desired functionality to be represented in the form of a block diagram. In this case a data object includes a graphical control model or even multiple graphical control models that is then automatically translated into program code written in a high-level language. This code generation can take place through multiple abstract intermediate stages in which the underlying data object in the form of the graphical control model is converted into various abstract intermediate representations. The non-executable control unit program code in a high-level language thus produced through various intermediate stages is then ultimately translated into executable control unit program code by a suitable compiler.
As is evident from the above remarks, a plurality of software tools are involved in the method described for generating control unit program code or intermediate representations of the control unit program code (graphical modeling environment, code generators, compilers, dedicated code checkers, etc.). Normally, all of these software tools output messages about the generation process in order to inform the user of anomalies concerning the generation process. For the graphical modeling environment, these may be notifications of unconnected ports of functional blocks, notifications of mismatched data types, notifications of conflicting sampling times, etc. Through messages in the form of warnings and error messages, the compiler can point out variables that are not declared or not initialized, missing termination conditions in loops, division by zero, etc.
The messages output by the software tools are fundamentally material and relevant for the generation process and for the evaluation of the generation process. This is evident merely from the fact that so-called “zero-warning requirements” are present in various fields of software development, which means that a control unit program code is not considered serviceable until warnings are no longer output by the software tools in the generation process leading to the control unit program code. Similar requirements are codified in certain standards, for example in the MISRA standard that is relevant for the generation of control unit program code in the automotive industry, but such requirements also increasingly find application in other industrial fields for safety-critical applications.
It can happen that certain messages from software tools are unavoidable, or else that messages are acknowledged by the user as noncritical, so that the occurrence of the messages is not a negative factor in evaluating the quality of the control unit program code. Nevertheless, the messages of the software tools must be checked during every further generation process, which entails a considerable amount of work.